package com.fita.admin.dao;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.fita.entity.authority.Role;
import com.fita.entity.authority.RoleResource;

import java.util.List;

/**
 * 
 * @author cuteHU
 *
 */
@Dao("hibernate")
public interface RoleResourceDao {

    /**
     * @param role
     * @return
     */
    @Query("FROM RoleResource WHERE role = :role ORDER BY resource.type ASC")
    List<RoleResource> list(@Variable("role") Role role);
}
